<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>盒子模型</title>
    <style>
* {
	margin: 0;
	padding: 0;
	color: #fff;
}

div {
	padding: 10px;
	width: 500px;
}

.border {
	/* IE盒模型 */
	box-sizing: border-box;
	border: 10px solid red;
	background: blue;
}

.content {
	/* 标准盒模型 */
	box-sizing: content-box;
	border: 10px solid blue;
	background: red;
}

    </style>
</head>

<body>
    <div class="border">
        IE盒模型：盒子宽度 = width = 500 <br>
        IE盒模型：内容宽度 = width - border - padding = 460
    </div>
    <br>
    <div class="content">
        标准盒模型：盒子宽度 = width + border + padding = 540 <br>
        标准盒模型：内容宽度 = width = 500
    </div>
</body>

</html>